<!DOCTYPE HTML>
<html lang="en" >
    
    <head>
        
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <title>JS 数据类型 | JoMin·个人笔记</title>
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <meta name="description" content="">
        <meta name="generator" content="GitBook 2.6.9">
        
        
        <meta name="HandheldFriendly" content="true"/>
        <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../../../gitbook/images/apple-touch-icon-precomposed-152.png">
        <link rel="shortcut icon" href="../../../gitbook/images/favicon.ico" type="image/x-icon">
        
    <link rel="stylesheet" href="../../../gitbook/style.css">
    
        
        <link rel="stylesheet" href="../../../gitbook/plugins/gitbook-plugin-expandable-chapters-interactive/expandable-chapters.css">
        
    
        
        <link rel="stylesheet" href="../../../gitbook/plugins/gitbook-plugin-highlight/website.css">
        
    
        
        <link rel="stylesheet" href="../../../gitbook/plugins/gitbook-plugin-search/search.css">
        
    
        
        <link rel="stylesheet" href="../../../gitbook/plugins/gitbook-plugin-fontsettings/website.css">
        
    
    

        
    
    
    <link rel="next" href="../../../md/css/JavaScript/2、数据类型的转换.html" />
    
    
    <link rel="prev" href="../../../md/css/JavaScript/JavaScript.html" />
    

        
    </head>
    <body>
        
        
    <div class="book"
        data-level="6.1"
        data-chapter-title="JS 数据类型"
        data-filepath="md/css/JavaScript/1、JavaScript数据类型.md"
        data-basepath="../../.."
        data-revision="Sun Aug 30 2020 17:22:53 GMT+0800 (中国标准时间)"
        data-innerlanguage="">
    

<div class="book-summary">
    <nav role="navigation">
        <ul class="summary">
            
            
            
            

            

            
    
        <li class="chapter " data-level="0" data-path="index.html">
            
                
                    <a href="../../../index.html">
                
                        <i class="fa fa-check"></i>
                        
                        Introduction
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1" data-path="md/css/HTML and CSS/1、css 的引入方式.html">
            
                
                    <a href="../../../md/css/HTML and CSS/1、css 的引入方式.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.</b>
                        
                        HTML and CSS
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.1" data-path="md/css/HTML and CSS/3、常用的标签.html">
            
                
                    <a href="../../../md/css/HTML and CSS/3、常用的标签.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.1.</b>
                        
                        常用的标签
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="md/css/HTML and CSS/4、表格的使用.html">
            
                
                    <a href="../../../md/css/HTML and CSS/4、表格的使用.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.2.</b>
                        
                        表格的使用
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="md/css/HTML and CSS/5、表单和新增元素.html">
            
                
                    <a href="../../../md/css/HTML and CSS/5、表单和新增元素.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.3.</b>
                        
                        表单和新增元素
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="md/css/HTML and CSS/6、a 标签的使用.html">
            
                
                    <a href="../../../md/css/HTML and CSS/6、a 标签的使用.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.4.</b>
                        
                        a 标签
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="md/css/HTML and CSS/7、盒子模型.html">
            
                
                    <a href="../../../md/css/HTML and CSS/7、盒子模型.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.5.</b>
                        
                        盒子模型
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.6" data-path="md/css/HTML and CSS/8、浮动.html">
            
                
                    <a href="../../../md/css/HTML and CSS/8、浮动.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.6.</b>
                        
                        浮动
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.7" data-path="md/css/HTML and CSS/9、css 常见问题.html">
            
                
                    <a href="../../../md/css/HTML and CSS/9、css 常见问题.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.7.</b>
                        
                        css 常见问题
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.8" data-path="md/css/HTML and CSS/10、位置定位.html">
            
                
                    <a href="../../../md/css/HTML and CSS/10、位置定位.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.8.</b>
                        
                        位置定位
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.9" data-path="md/css/HTML and CSS/11、阴影设置.html">
            
                
                    <a href="../../../md/css/HTML and CSS/11、阴影设置.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.9.</b>
                        
                        阴影设置
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.10" data-path="md/css/HTML and CSS/12、自定义动画.html">
            
                
                    <a href="../../../md/css/HTML and CSS/12、自定义动画.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.10.</b>
                        
                        动画
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.11" data-path="md/css/HTML and CSS/13、容器居中方法.html">
            
                
                    <a href="../../../md/css/HTML and CSS/13、容器居中方法.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.11.</b>
                        
                        容器居中
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.12" data-path="md/css/HTML and CSS/14、fullpage 的使用.html">
            
                
                    <a href="../../../md/css/HTML and CSS/14、fullpage 的使用.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.12.</b>
                        
                        fullpage 的使用
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2" data-path="img/gitbook的安装.html">
            
                
                    <a href="../../../img/gitbook的安装.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.</b>
                        
                        gitbook 的安装
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3" data-path="md/css/移动端/移动端.html">
            
                
                    <a href="../../../md/css/移动端/移动端.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.</b>
                        
                        移动端
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="3.1" data-path="md/css/移动端/1、关于移动端.html">
            
                
                    <a href="../../../md/css/移动端/1、关于移动端.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.1.</b>
                        
                        关于移动端
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.2" data-path="md/css/移动端/2、移动端小问题.html">
            
                
                    <a href="../../../md/css/移动端/2、移动端小问题.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.2.</b>
                        
                        移动端小问题
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="4" data-path="md/css/flex布局/flex.html">
            
                
                    <a href="../../../md/css/flex布局/flex.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.</b>
                        
                        flex 弹性盒子
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="4.1" data-path="md/css/flex布局/1、flex布局.html">
            
                
                    <a href="../../../md/css/flex布局/1、flex布局.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.1.</b>
                        
                        flex 布局
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="5" data-path="md/css/响应式布局/bootstrap.html">
            
                
                    <a href="../../../md/css/响应式布局/bootstrap.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.</b>
                        
                        响应式布局
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="5.1" data-path="md/css/响应式布局/1、Bootstrap.html">
            
                
                    <a href="../../../md/css/响应式布局/1、Bootstrap.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.1.</b>
                        
                        Bootstrap
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.2" data-path="md/css/响应式布局/2、媒体查询.html">
            
                
                    <a href="../../../md/css/响应式布局/2、媒体查询.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.2.</b>
                        
                        媒体查询
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="6" data-path="md/css/JavaScript/JavaScript.html">
            
                
                    <a href="../../../md/css/JavaScript/JavaScript.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.</b>
                        
                        JavaScript
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter active" data-level="6.1" data-path="md/css/JavaScript/1、JavaScript数据类型.html">
            
                
                    <a href="../../../md/css/JavaScript/1、JavaScript数据类型.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.1.</b>
                        
                        JS 数据类型
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="6.2" data-path="md/css/JavaScript/2、数据类型的转换.html">
            
                
                    <a href="../../../md/css/JavaScript/2、数据类型的转换.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.2.</b>
                        
                        数据类型的转换
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="6.3" data-path="md/css/JavaScript/3、运算符.html">
            
                
                    <a href="../../../md/css/JavaScript/3、运算符.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.3.</b>
                        
                        运算符
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="6.4" data-path="md/css/JavaScript/4、赋值运算符.html">
            
                
                    <a href="../../../md/css/JavaScript/4、赋值运算符.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.4.</b>
                        
                        赋值运算符
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="6.5" data-path="md/css/JavaScript/5、比较运算符.html">
            
                
                    <a href="../../../md/css/JavaScript/5、比较运算符.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.5.</b>
                        
                        比较运算符
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="6.6" data-path="md/css/JavaScript/6、逻辑操作符.html">
            
                
                    <a href="../../../md/css/JavaScript/6、逻辑操作符.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.6.</b>
                        
                        逻辑操作符
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="6.7" data-path="md/css/JavaScript/7、条件运算符.html">
            
                
                    <a href="../../../md/css/JavaScript/7、条件运算符.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.7.</b>
                        
                        条件运算符
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="6.8" data-path="md/css/JavaScript/8、位运算符.html">
            
                
                    <a href="../../../md/css/JavaScript/8、位运算符.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.8.</b>
                        
                        位运算符
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="6.9" data-path="md/css/JavaScript/9、条件语句.html">
            
                
                    <a href="../../../md/css/JavaScript/9、条件语句.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.9.</b>
                        
                        条件语句
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="6.10" data-path="md/css/JavaScript/10、循环语句.html">
            
                
                    <a href="../../../md/css/JavaScript/10、循环语句.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.10.</b>
                        
                        循环语句
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="6.11" data-path="md/css/JavaScript/11、break和continue.html">
            
                
                    <a href="../../../md/css/JavaScript/11、break和continue.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.11.</b>
                        
                        break 和 continue
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="6.12" data-path="md/css/JavaScript/12、for循环.html">
            
                
                    <a href="../../../md/css/JavaScript/12、for循环.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.12.</b>
                        
                        for 循环
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="6.13" data-path="md/css/JavaScript/13、多层循环.html">
            
                
                    <a href="../../../md/css/JavaScript/13、多层循环.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.13.</b>
                        
                        多层循环
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="6.14" data-path="md/css/JavaScript/14、for-in循环.html">
            
                
                    <a href="../../../md/css/JavaScript/14、for-in循环.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.14.</b>
                        
                        for-in 循环
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="6.15" data-path="md/css/JavaScript/15、try-catch语句.html">
            
                
                    <a href="../../../md/css/JavaScript/15、try-catch语句.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.15.</b>
                        
                        try-catch 语句
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="6.16" data-path="md/css/JavaScript/16、函数.html">
            
                
                    <a href="../../../md/css/JavaScript/16、函数.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.16.</b>
                        
                        函数
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="6.17" data-path="md/css/JavaScript/17、循环排序.html">
            
                
                    <a href="../../../md/css/JavaScript/17、循环排序.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.17.</b>
                        
                        循环排序
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="6.18" data-path="md/css/JavaScript/18、es6语法.html">
            
                
                    <a href="../../../md/css/JavaScript/18、es6语法.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.18.</b>
                        
                        es6 语法
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="6.19" data-path="md/css/JavaScript/19、数组对象.html">
            
                
                    <a href="../../../md/css/JavaScript/19、数组对象.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.19.</b>
                        
                        数组对象
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="6.20" data-path="md/css/JavaScript/20、date对象.html">
            
                
                    <a href="../../../md/css/JavaScript/20、date对象.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.20.</b>
                        
                        date 对象
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="6.21" data-path="md/css/JavaScript/21、Boolean对象.html">
            
                
                    <a href="../../../md/css/JavaScript/21、Boolean对象.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.21.</b>
                        
                        Boolean 对象
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="6.22" data-path="md/css/JavaScript/22、数学对象.html">
            
                
                    <a href="../../../md/css/JavaScript/22、数学对象.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.22.</b>
                        
                        数学对象
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="6.23" data-path="md/css/JavaScript/23、对象的创建.html">
            
                
                    <a href="../../../md/css/JavaScript/23、对象的创建.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.23.</b>
                        
                        对象的创建
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="7" data-path="md/css/BOM/BOM.html">
            
                
                    <a href="../../../md/css/BOM/BOM.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>7.</b>
                        
                        BOM
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="7.1" data-path="md/css/BOM/1、window对象.html">
            
                
                    <a href="../../../md/css/BOM/1、window对象.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>7.1.</b>
                        
                        window 对象
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="7.2" data-path="md/css/BOM/2、navigator对象.html">
            
                
                    <a href="../../../md/css/BOM/2、navigator对象.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>7.2.</b>
                        
                        navigator 对象
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="7.3" data-path="md/css/BOM/3、screen对象.html">
            
                
                    <a href="../../../md/css/BOM/3、screen对象.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>7.3.</b>
                        
                        screen 对象
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="7.4" data-path="md/css/BOM/4、history对象.html">
            
                
                    <a href="../../../md/css/BOM/4、history对象.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>7.4.</b>
                        
                        history 对象
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="7.5" data-path="md/css/BOM/5、location对象.html">
            
                
                    <a href="../../../md/css/BOM/5、location对象.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>7.5.</b>
                        
                        location 对象
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="7.6" data-path="md/css/BOM/6、cookie对象.html">
            
                
                    <a href="../../../md/css/BOM/6、cookie对象.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>7.6.</b>
                        
                        cookie 对象
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="7.7" data-path="md/css/BOM/7、html5本地存储.html">
            
                
                    <a href="../../../md/css/BOM/7、html5本地存储.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>7.7.</b>
                        
                        html5 本地存储
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="8" data-path="md/css/DOM/DOM.html">
            
                
                    <a href="../../../md/css/DOM/DOM.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>8.</b>
                        
                        DOM
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="8.1" data-path="md/css/DOM/1、DOM介绍.html">
            
                
                    <a href="../../../md/css/DOM/1、DOM介绍.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>8.1.</b>
                        
                        DOM 介绍
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="8.2" data-path="md/css/DOM/2、元素对象.html">
            
                
                    <a href="../../../md/css/DOM/2、元素对象.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>8.2.</b>
                        
                        元素对象
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="8.3" data-path="md/css/DOM/3、DOM事件1.html">
            
                
                    <a href="../../../md/css/DOM/3、DOM事件1.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>8.3.</b>
                        
                        DOM 事件 1
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="8.4" data-path="md/css/DOM/4、DOM事件2.html">
            
                
                    <a href="../../../md/css/DOM/4、DOM事件2.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>8.4.</b>
                        
                        DOM 事件 2
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="8.5" data-path="md/css/DOM/5、移动端事件.html">
            
                
                    <a href="../../../md/css/DOM/5、移动端事件.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>8.5.</b>
                        
                        移动端事件
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="9" data-path="md/css/Ajax/Ajax.html">
            
                
                    <a href="../../../md/css/Ajax/Ajax.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>9.</b>
                        
                        Ajax
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="9.1" data-path="md/css/Ajax/Ajax的实现过程.html">
            
                
                    <a href="../../../md/css/Ajax/Ajax的实现过程.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>9.1.</b>
                        
                        Ajax 的实现过程
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="10" data-path="md/css/jQuery/jQuery.html">
            
                
                    <a href="../../../md/css/jQuery/jQuery.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>10.</b>
                        
                        jQuery
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="10.1" data-path="md/css/jQuery/1、选择器和效果.html">
            
                
                    <a href="../../../md/css/jQuery/1、选择器和效果.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>10.1.</b>
                        
                        选择器和效果
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="10.2" data-path="md/css/jQuery/2、jQuery属性.html">
            
                
                    <a href="../../../md/css/jQuery/2、jQuery属性.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>10.2.</b>
                        
                        jQuery 属性
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="10.3" data-path="md/css/jQuery/3、正则表达式.html">
            
                
                    <a href="../../../md/css/jQuery/3、正则表达式.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>10.3.</b>
                        
                        正则表达式
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="10.4" data-path="md/css/jQuery/4、选择器和操作.html">
            
                
                    <a href="../../../md/css/jQuery/4、选择器和操作.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>10.4.</b>
                        
                        选择器和操作
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="11" data-path="md/css/VUE/vue.html">
            
                
                    <a href="../../../md/css/VUE/vue.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>11.</b>
                        
                        VUE
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="11.1" data-path="md/css/VUE/1、绑定class和style.html">
            
                
                    <a href="../../../md/css/VUE/1、绑定class和style.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>11.1.</b>
                        
                        绑定 class 和 style
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="11.2" data-path="md/css/VUE/2、绑定表单.html">
            
                
                    <a href="../../../md/css/VUE/2、绑定表单.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>11.2.</b>
                        
                        绑定表单
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="11.3" data-path="md/css/VUE/3、组件之间的数据传递.html">
            
                
                    <a href="../../../md/css/VUE/3、组件之间的数据传递.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>11.3.</b>
                        
                        组件之间的数据传递
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="11.4" data-path="md/css/VUE/4、vue-router.html">
            
                
                    <a href="../../../md/css/VUE/4、vue-router.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>11.4.</b>
                        
                        vue-router
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="11.5" data-path="md/css/VUE/style样式.html">
            
                
                    <a href="../../../md/css/VUE/style样式.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>11.5.</b>
                        
                        style 样式
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="11.6" data-path="md/css/VUE/生命周期函数.html">
            
                
                    <a href="../../../md/css/VUE/生命周期函数.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>11.6.</b>
                        
                        生命周期函数
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="11.7" data-path="md/css/VUE/vue-resource.html">
            
                
                    <a href="../../../md/css/VUE/vue-resource.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>11.7.</b>
                        
                        vue-resource
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="11.8" data-path="md/css/VUE/axios.html">
            
                
                    <a href="../../../md/css/VUE/axios.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>11.8.</b>
                        
                        axios
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="11.9" data-path="md/css/VUE/vue动画.html">
            
                
                    <a href="../../../md/css/VUE/vue动画.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>11.9.</b>
                        
                        vue 动画
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="11.10" data-path="md/css/VUE/插槽的使用.html">
            
                
                    <a href="../../../md/css/VUE/插槽的使用.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>11.10.</b>
                        
                        插槽的使用
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="11.11" data-path="md/css/VUE/ajax与框架搭建.html">
            
                
                    <a href="../../../md/css/VUE/ajax与框架搭建.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>11.11.</b>
                        
                        ajax 与框架搭建
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="11.12" data-path="md/css/VUE/计算属性VS侦听属性.html">
            
                
                    <a href="../../../md/css/VUE/计算属性VS侦听属性.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>11.12.</b>
                        
                        计算属性 VS 侦听属性
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="11.13" data-path="md/css/VUE/组件之间数据传递.html">
            
                
                    <a href="../../../md/css/VUE/组件之间数据传递.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>11.13.</b>
                        
                        组件之间数据传递
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="12" data-path="md/css/阿里巴巴矢量图标库.html">
            
                
                    <a href="../../../md/css/阿里巴巴矢量图标库.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>12.</b>
                        
                        阿里巴巴矢量图标库
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="13" data-path="md/css/ES6/ES6.html">
            
                
                    <a href="../../../md/css/ES6/ES6.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>13.</b>
                        
                        ES6
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="13.1" data-path="md/css/ES6/1、promise.html">
            
                
                    <a href="../../../md/css/ES6/1、promise.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>13.1.</b>
                        
                        promise
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="13.2" data-path="md/css/ES6/2、数组的扩展.html">
            
                
                    <a href="../../../md/css/ES6/2、数组的扩展.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>13.2.</b>
                        
                        数组的扩展
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="13.3" data-path="md/css/ES6/3、set的使用.html">
            
                
                    <a href="../../../md/css/ES6/3、set的使用.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>13.3.</b>
                        
                        set 的使用
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="13.4" data-path="md/css/ES6/4、类和类的继承.html">
            
                
                    <a href="../../../md/css/ES6/4、类和类的继承.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>13.4.</b>
                        
                        类和类的继承
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="14" data-path="md/css/JS、JQ阻止事件冒泡.html">
            
                
                    <a href="../../../md/css/JS、JQ阻止事件冒泡.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>14.</b>
                        
                        JS、JQ 阻止事件冒泡
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="15" data-path="md/css/微信小程序/微信小程序.html">
            
                
                    <a href="../../../md/css/微信小程序/微信小程序.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>15.</b>
                        
                        微信小程序
                    </a>
            
            
        </li>
    


            
            <li class="divider"></li>
            <li>
                <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
                    Published with GitBook
                </a>
            </li>
            
        </ul>
    </nav>
</div>

    <div class="book-body">
        <div class="body-inner">
            <div class="book-header" role="navigation">
    <!-- Actions Left -->
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="../../../" >JoMin·个人笔记</a>
    </h1>
</div>

            <div class="page-wrapper" tabindex="-1" role="main">
                <div class="page-inner">
                
                
                    <section class="normal" id="section-">
                    
                        <h1 id="javascript&#x57FA;&#x7840;&#x77E5;&#x8BC6;">JavaScript&#x57FA;&#x7840;&#x77E5;&#x8BC6;</h1>
<h3 id="javascript&#x662F;&#x5F31;&#x7C7B;&#x578B;&#x811A;&#x672C;&#x8BED;&#x8A00;&#xFF0C;&#x540C;&#x4E00;&#x4E2A;&#x53D8;&#x91CF;&#x53EF;&#x4EE5;&#x6539;&#x53D8;&#x5176;&#x6570;&#x636E;&#x7C7B;&#x578B;&#xFF08;&#x6BD4;&#x5982;&#xFF1A;&#x53D8;&#x91CF;y&#x4E00;&#x5F00;&#x56DB;&#x4E3A;&#x6570;&#x503C;&#x7C7B;&#x578B;&#xFF0C;&#x53EF;&#x4EE5;&#x66F4;&#x6539;&#x4E3A;&#x5B57;&#x7B26;&#x4E32;&#x7C7B;&#x578B;&#xFF09;">JavaScript&#x662F;&#x5F31;&#x7C7B;&#x578B;&#x811A;&#x672C;&#x8BED;&#x8A00;&#xFF0C;&#x540C;&#x4E00;&#x4E2A;&#x53D8;&#x91CF;&#x53EF;&#x4EE5;&#x6539;&#x53D8;&#x5176;&#x6570;&#x636E;&#x7C7B;&#x578B;&#xFF08;&#x6BD4;&#x5982;&#xFF1A;&#x53D8;&#x91CF;y&#x4E00;&#x5F00;&#x56DB;&#x4E3A;&#x6570;&#x503C;&#x7C7B;&#x578B;&#xFF0C;&#x53EF;&#x4EE5;&#x66F4;&#x6539;&#x4E3A;&#x5B57;&#x7B26;&#x4E32;&#x7C7B;&#x578B;&#xFF09;</h3>
<h3 id="&#x76F8;&#x53CD;-&#x5F3A;&#x7C7B;&#x578B;&#x8BED;&#x8A00;&#x7684;&#x53D8;&#x91CF;&#x7684;&#x6570;&#x636E;&#x7C7B;&#x578B;&#x662F;&#x4E0D;&#x53EF;&#x53D8;&#x7684;&#xFF08;&#x6BD4;&#x5982;&#xFF1A;java&#xFF0C;c&#xFF09;">&#x76F8;&#x53CD; &#x5F3A;&#x7C7B;&#x578B;&#x8BED;&#x8A00;&#x7684;&#x53D8;&#x91CF;&#x7684;&#x6570;&#x636E;&#x7C7B;&#x578B;&#x662F;&#x4E0D;&#x53EF;&#x53D8;&#x7684;&#xFF08;&#x6BD4;&#x5982;&#xFF1A;Java&#xFF0C;C&#xFF09;</h3>
<p>JavaScript&#x4E2D;&#x8FD9;&#x4E2A;y&#x5C31;&#x4EE3;&#x8868;&#x4E00;&#x4E2A;&#x53D8;&#x91CF;&#xFF0C;&#x7B49;&#x53F7;&#x53EB;&#x505A;&#x8D4B;&#x503C;&#x8FD0;&#x7B97;&#x7B26;&#xFF0C;&#x50CF;&quot;&#x6587;&#x5B57;&quot;&#x7528;&#x53CC;&#x5F15;&#x53F7;&#x62EC;&#x8D77;&#x6765;&#x7684;&#x4E1C;&#x897F;&#xFF0C;&#x53EB;&#x505A;&#x5B57;&#x7B26;&#x4E32;</p>
<pre><code>y = 5;
y = &quot;&#x6587;&#x5B57;&quot;
</code></pre><p>JavaScript&#x7531;&#x4E09;&#x90E8;&#x5206;&#x7EC4;&#x6210;</p>
<pre><code>ECMAScript&#xFF1A;&#x63CF;&#x8FF0;&#x4E86;JavaScript&#x7684;&#x6838;&#x5FC3;&#x8BED;&#x6CD5;&#x3002;
Dom&#xFF08;document object model&#xFF09;&#xFF1A;&#x6587;&#x6863;&#x5BF9;&#x8C61;&#x6A21;&#x578B;&#xFF0C;&#x7528;&#x6765;&#x64CD;&#x4F5C;html&#x6587;&#x6863;&#x3002;
Bom&#xFF08;browser object model&#xFF09;&#xFF1A;&#x6D4F;&#x89C8;&#x5668;&#x5BF9;&#x8C61;&#x6A21;&#x578B;&#xFF0C;&#x7528;&#x6765;&#x64CD;&#x4F5C;&#x6D4F;&#x89C8;&#x5668;&#x3002;
</code></pre><p>&#x5C06;JavaScript&#x5F15;&#x7528;&#x5230;&#x7F51;&#x9875;&#x4E2D;</p>
<pre><code>1&#x3001;&#x901A;&#x8FC7;script&#x6807;&#x7B7E;&#x63D2;&#x5165;&#x5230;&#x7F51;&#x9875;&#x4E2D;&#xFF0C;&#x5728;script&#x6807;&#x7B7E;&#x4E2D;&#x6765;&#x4E66;&#x5199;JavaScript&#x4EE3;&#x7801;&#x3002;&lt;script&gt;&lt;/script&gt;
      &#x53EF;&#x4EE5;&#x63D2;&#x5165;&#x5728;head&#x6807;&#x7B7E;&#x4E2D;&#xFF0C;&#x6216;&#x8005;&#x662F;body&#x7ED3;&#x675F;&#x6807;&#x7B7E;&#x524D;&#x9762;&#xFF0C;&#x5EFA;&#x8BAE;&#x628A;script&#x63D2;&#x5165;&#x5230;body&#x7ED3;&#x675F;&#x6807;&#x7B7E;&#x524D;&#x9762;&#x3002;
2&#x3001;&#x628A;JavaScript&#x4EE3;&#x7801;&#x76F4;&#x63A5;&#x63D2;&#x5165;&#x5230;&#x6807;&#x7B7E;&#x4E2D;&#x3002;     &lt;p onclick=&quot;alert(&apos;&#x5927;&#x5BB6;&#x597D;&#xFF0C;&#x6211;&#x4ECA;&#x5E74;18&#x5C81;&#x4E86;&#xFF01;&apos;)&quot;&gt;&#x70B9;&#x51FB;&#x6211;&#x5F39;&#x51FA;&#x4E00;&#x4E2A;&#x63D0;&#x793A;&#x8BED;&lt;/p&gt;
3&#x3001;&#x901A;&#x8FC7;script&#x6807;&#x7B7E;&#x7684;src&#x5C5E;&#x6027;&#x5F15;&#x5165;&#x5916;&#x90E8;js&#x811A;&#x672C;&#x3002; &lt;script src=&quot;js/index.js&quot;&gt;&lt;/script&gt;
</code></pre><p>JavaScript&#x7684;&#x6838;&#x5FC3;&#x8BED;&#x6CD5;</p>
<pre><code>1&#x3001;&#x53D8;&#x91CF;&#x7684;&#x58F0;&#x660E;
    &#x901A;&#x8FC7;&#x5173;&#x952E;&#x5B57;var&#x6765;&#x58F0;&#x660E;&#x53D8;&#x91CF;&#xFF0C;&#x8BED;&#x6CD5;&#xFF1A;
    var &#x53D8;&#x91CF;&#x540D; = &#x503C;;
&#x5728;JavaScript&#x4E2D;&#xFF0C;&#x5206;&#x53F7;&#x4EE3;&#x8868;&#x4E00;&#x53E5;&#x8BDD;&#x7684;&#x7ED3;&#x675F;&#xFF0C;&#x662F;&#x53EF;&#x52A0;&#x53EF;&#x4E0D;&#x52A0;&#x7684;&#xFF08;&#x5EFA;&#x8BAE;&#x52A0;&#x4E0A;&#xFF09;&#x3002;
</code></pre><p>&#x53D8;&#x91CF;&#x7684;&#x547D;&#x540D;&#x89C4;&#x5219;</p>
<pre><code>1&#x3001;&#x7B2C;&#x4E00;&#x4E2A;&#x5B57;&#x7B26;&#x5FC5;&#x987B;&#x662F;&#x5B57;&#x6BCD;&#x3001;&#x4E0B;&#x5212;&#x7EBF;(&quot;_&quot;)&#x6216;&#x8005;&#x662F;&quot;$&quot;;
2&#x3001;&#x53D8;&#x91CF;&#x540D;&#x4E2D;&#x95F4;&#x4E0D;&#x80FD;&#x4F7F;&#x7528;&#x7A7A;&#x683C;&#x6216;&#x8005;&#x5176;&#x4ED6;&#x7279;&#x7279;&#x6B8A;&#x7B26;&#x53F7;(&#x4E0B;&#x5212;&#x7EBF;&#x8DDF;$&#x9664;&#x5916;)&#x3002;
3&#x3001;&#x53D8;&#x91CF;&#x540D;&#x662F;&#x533A;&#x5206;&#x5927;&#x5C0F;&#x5199;&#x7684;&#x3002;
4&#x3001;&#x4E0D;&#x80FD;&#x4F7F;&#x7528;&#x5173;&#x952E;&#x5B57;&#x6216;&#x4FDD;&#x7559;&#x5B57;&#x3002;
</code></pre><p>&#x5728;&#x7F51;&#x9875;&#x4E2D;&#x67E5;&#x770B;&#x58F0;&#x660E;&#x53D8;&#x91CF;&#x7684;&#x503C;</p>
<pre><code>1&#x3001;alert()&#xFF1A;&#x5F39;&#x7A97;  &lt;p onclick=&quot;alert(&apos;&#x5927;&#x5BB6;&#x597D;&#xFF0C;&#x6211;&#x4ECA;&#x5E74;18&#x5C81;&#x4E86;&#xFF01;&apos;)&quot;&gt;&#x70B9;&#x51FB;&#x6211;&#x5F39;&#x51FA;&#x4E00;&#x4E2A;&#x63D0;&#x793A;&#x8BED;&lt;/p&gt;
2&#x3001;document.write()&#xFF1A;&#x5199;&#x5165;&#x7F51;&#x9875;&#x4E2D;
3&#x3001;console.log()&#xFF1A;&#x5C06;&#x5185;&#x5BB9;&#x6253;&#x5370;&#x5728;&#x6D4F;&#x89C8;&#x5668;&#x63A7;&#x5236;&#x53F0;&#x4E0A;&#x3002;
</code></pre><pre><code>console.log(num);
document.write(num);
console.log(str);
document.write(str);

//var str = &quot;123&quot;;
//console.log(-str); Uncaught SyntaxError&#xFF0C;&#x8BED;&#x6CD5;&#x9519;&#x8BEF;

var _str = &quot;7789&quot;;
console.log(_str);

var age = &quot;18&quot;;
var Age = &quot;19&quot;;
console.log(age,Age);

var age = &quot;18&quot;,sex = &quot;&#x7537;&quot;,userName=&quot;superman&quot;;
console.log(age,sex,userName);
</code></pre><h1 id="javascript&#x7684;&#x6570;&#x636E;&#x7C7B;&#x578B;&#xFF08;2&#x79CD;&#xFF09;">JavaScript&#x7684;&#x6570;&#x636E;&#x7C7B;&#x578B;&#xFF08;2&#x79CD;&#xFF09;</h1>
<h4 id="&#x539F;&#x59CB;&#x7C7B;&#x578B;&#x548C;&#x5F15;&#x7528;&#x7C7B;&#x578B;&#x4ED6;&#x4EEC;&#x7684;&#x50A8;&#x5B58;&#x65B9;&#x5F0F;&#x4E0D;&#x4E00;&#x6837;&#xFF0C;&#x539F;&#x59CB;&#x7C7B;&#x578B;&#x7684;&#x503C;&#x662F;&#x50A8;&#x5B58;&#x5728;&#x6808;&#x91CC;&#x9762;&#xFF0C;&#x5F15;&#x7528;&#x7C7B;&#x578B;&#x662F;&#x50A8;&#x5B58;&#x5728;&#x5806;&#x91CC;&#x9762;&#x7684;&#x3002;">&#x539F;&#x59CB;&#x7C7B;&#x578B;&#x548C;&#x5F15;&#x7528;&#x7C7B;&#x578B;&#x4ED6;&#x4EEC;&#x7684;&#x50A8;&#x5B58;&#x65B9;&#x5F0F;&#x4E0D;&#x4E00;&#x6837;&#xFF0C;&#x539F;&#x59CB;&#x7C7B;&#x578B;&#x7684;&#x503C;&#x662F;&#x50A8;&#x5B58;&#x5728;&#x6808;&#x91CC;&#x9762;&#xFF0C;&#x5F15;&#x7528;&#x7C7B;&#x578B;&#x662F;&#x50A8;&#x5B58;&#x5728;&#x5806;&#x91CC;&#x9762;&#x7684;&#x3002;</h4>
<pre><code>1&#x3001;&#x7B80;&#x5355;&#x6570;&#x636E;&#x7C7B;&#x578B;&#xFF08;&#x539F;&#x59CB;&#x7C7B;&#x578B;&#xFF09;
        a&#x3001;&#x5B57;&#x7B26;&#x4E32;&#xFF08;string&#xFF09;
                &#x7528;&#x5F15;&#x53F7;&#x62EC;&#x8D77;&#x6765;&#x7684;&#x5C31;&#x662F;&#x5B57;&#x7B26;&#x4E32;&#xFF0C;&#x5305;&#x62EC;&#x53CC;&#x5F15;&#x53F7;&#x8DDF;&#x5355;&#x5F15;&#x53F7;&#x3002;
                 &#x6CE8;&#x610F;&#xFF1A;&#x53CC;&#x5F15;&#x53F7;&#x4E0D;&#x80FD;&#x5D4C;&#x5957;&#x53CC;&#x5F15;&#x53F7;&#xFF0C;&#x5355;&#x5F15;&#x53F7;&#x4E5F;&#x4E0D;&#x80FD;&#x5D4C;&#x5957;&#x5355;&#x5F15;&#x53F7;&#xFF0C;
                 &#x4F46;&#x662F;&#x53EF;&#x4EE5;&#x4EA4;&#x53C9;&#x5D4C;&#x5957;&#xFF0C;&#x5373;&#x53CC;&#x5F15;&#x53F7;&#x91CC;&#x9762;&#x5D4C;&#x5957;&#x5355;&#x5F15;&#x53F7;&#xFF0C;&#x5355;&#x5F15;&#x53F7;&#x91CC;&#x9762;&#x4E5F;&#x53EF;&#x4EE5;&#x5D4C;&#x5957;&#x53CC;&#x5F15;&#x53F7;&#x3002;

        b&#x3001;&#x6570;&#x503C;&#x7C7B;&#x578B;&#xFF08;Number&#xFF09;
                var num = 123&#xFF1B;
                 var num = 12.34&#xFF1B;
                 &#x4E5F;&#x53EF;&#x4EE5;&#x7528;&#x5176;&#x4ED6;&#x8FDB;&#x5236;&#x8868;&#x793A;&#xFF0C;&#x6BD4;&#x5982;16&#x8FDB;&#x5236;&#x7B49;
                 &#x6709;&#x4E09;&#x4E2A;&#x7279;&#x6B8A;&#x503C;
                 +Infinity&#xFF0C;&#x6B63;&#x65E0;&#x7A77;&#x5927;
                 -Infinity&#xFF0C;&#x8D1F;&#x65E0;&#x7A77;&#x5927;
                 NaN&#xFF0C;&#x8868;&#x793A;&#x4E0D;&#x662F;&#x4E00;&#x4E2A;&#x6570;&#x503C;&#xFF0C;&#x4F46;&#x662F;&#x4ED6;&#x7684;&#x7C7B;&#x578B;&#x662F;&#x6570;&#x503C;&#x7C7B;&#x578B;&#x3002;
                 isNaN()&#x65B9;&#x6CD5;&#xFF0C;&#x7528;&#x4E8E;&#x68C0;&#x67E5;&#x5176;&#x53C2;&#x6570;&#x7684;&#x6570;&#x503C;&#x7C7B;&#x578B;&#x662F;&#x5426;&#x4E3A;&#x975E;&#x6570;&#x503C;&#x7C7B;&#x578B;&#x3002;

        c&#x3001;&#x5E03;&#x5C14;&#x503C;&#xFF08;boolean&#xFF09;
                 &#x53EA;&#x6709;&#x4E24;&#x4E2A;&#x503C;&#xFF1A;true&#xFF08;&#x771F;&#xFF09;&#xFF0C;false&#xFF08;&#x5047;&#xFF09;&#xFF1B;

        d&#x3001;undefined&#xFF1A;&#x8868;&#x793A;&#x53D8;&#x91CF;&#x672A;&#x8D4B;&#x503C;&#x7684;&#x9ED8;&#x8BA4;&#x503C;,&#x4E5F;&#x53EF;&#x4EE5;&#x4EE3;&#x8868;&#x7A7A;&#x3002;

        e&#x3001;null&#xFF1A;&#x7A7A;&#xFF0C;&#x8868;&#x793A;&#x5BF9;&#x7A7A;&#x5BF9;&#x8C61;&#x7684;&#x5F15;&#x7528;&#x3002;
             &#x901A;&#x5E38;&#x53EF;&#x4EE5;&#x7528;null&#x6765;&#x60C5;&#x51B5;&#x6570;&#x636E;&#x3002;


2&#x3001;&#x590D;&#x6742;&#x6570;&#x636E;&#x7C7B;&#x578B;&#xFF08;&#x5F15;&#x7528;&#x7C7B;&#x578B;&#xFF09;
        a&#x3001;&#x5BF9;&#x8C61;(object)&#xFF0C;&#x662F;&#x5C5E;&#x6027;&#x548C;&#x65B9;&#x6CD5;&#x7684;&#x96C6;&#x5408;&#x3002;


     &#x5224;&#x65AD;&#x6570;&#x636E;&#x7C7B;&#x578B;&#xFF0C;&#x53EF;&#x4EE5;&#x901A;&#x8FC7;typeof()&#x65B9;&#x6CD5;&#x6765;&#x5F97;&#x5230;&#x3002;
</code></pre><p>&#x4E00;&#x4E2A;&#x7B49;&#x53F7;&#x662F;&#x8D4B;&#x503C;&#xFF0C;&#x4E24;&#x4E2A;&#x7B49;&#x53F7;&#x662F;&#x5224;&#x65AD;&#xFF0C;&#x53EA;&#x5224;&#x65AD;&#x503C;,&#x4E09;&#x4E2A;&#x7B49;&#x53F7;&#x8868;&#x793A;&#x5224;&#x65AD;&#x662F;&#x5426;&#x5168;&#x7B49;&#x4E8E;&#xFF0C;&#x5373;&#x8981;&#x5224;&#x65AD;&#x6570;&#x503C;&#x4E5F;&#x8981;&#x5224;&#x65AD;&#x7C7B;&#x578B;&#x3002;</p>
<pre><code>            var onColor = true;
            document.getElementById(&quot;test&quot;).onclick = function(){
                if(onColor == true){
                    document.getElementById(&quot;test&quot;).style.background = &quot;pink&quot;;
                    //onColor = false;
                }
                else{
                    document.getElementById(&quot;test&quot;).style.background = &quot;skyblue&quot;;
                    //onColor = true;
                }
                    //!&#x8868;&#x793A;&#x53D6;&#x53CD;&#xFF0C;&#x5373;&#x771F;&#x53D6;&#x53CD;&#x540E;&#x4E3A;&#x5047;&#x3002;
                onColor = !onColor;

            var age = undefined;
            console.log(typeof(age));
            var userName;
            console.log(userName);            
            var sex = null;
            console.log(typeof(sex));//object&#xFF0C;&#x5BF9;&#x8C61;
            console.log(sex);
            //&#x4E24;&#x4E2A;&#x7B49;&#x53F7;&#x8868;&#x793A;&#x5224;&#x65AD;&#x662F;&#x5426;&#x7B49;&#x4E8E;&#xFF0C;&#x53EA;&#x5224;&#x65AD;&#x503C;&#x3002;
            console.log(undefined == null);//true
            //&#x4E09;&#x4E2A;&#x7B49;&#x53F7;&#x8868;&#x793A;&#x5224;&#x65AD;&#x662F;&#x5426;&#x5168;&#x7B49;&#x4E8E;&#xFF0C;&#x5373;&#x8981;&#x5224;&#x65AD;&#x6570;&#x503C;&#x4E5F;&#x8981;&#x5224;&#x65AD;&#x7C7B;&#x578B;&#x3002;
            console.log(undefined === null);//false
</code></pre><h3 id="&#x4EE3;&#x8868;&#x52A0;&#x6CD5;&#x8FD0;&#x7B97;&#x7B26;">&#x201C;+&#x201D;&#x4EE3;&#x8868;&#x52A0;&#x6CD5;&#x8FD0;&#x7B97;&#x7B26;</h3>
<pre><code>            var num = 123;
            console.log(num, typeof(num)); //Number
            var num1 = &quot;123&quot;;
            console.log(num1, typeof(num1)); //string
            var num2 = 789;
            console.log(num + num2); //912&#xFF0C; &#x6570;&#x503C;&#x7C7B;&#x578B;

            //&#x5B57;&#x7B26;&#x4E32;&#x7684;&#x62FC;&#x63A5;&#xFF0C; + &#x662F;&#x5B57;&#x7B26;&#x4E32;&#x62FC;&#x63A5;&#x7B26;
            console.log(num + num1); //123123&#xFF0C;&#x5B57;&#x7B26;&#x4E32;&#x7C7B;&#x578B;
</code></pre><h3 id="&#x5341;&#x516D;&#x8FDB;&#x5236;&#x7531;09&#x548C;af&#x8868;&#x793A;&#xFF0C;af&#x5C31;&#x4EE3;&#x8868;&#x6570;&#x503C;1015&#xFF0C;&#x901A;&#x5E38;&#x5F00;&#x5934;&#x4E3A;0x&#x5C31;&#x8868;&#x793A;&#x4E3A;&#x4E00;&#x4E2A;16&#x8FDB;&#x5236;&#x7684;&#x503C;">&#x5341;&#x516D;&#x8FDB;&#x5236;&#x7531;0~9&#x548C;A~F&#x8868;&#x793A;&#xFF0C;A~F&#x5C31;&#x4EE3;&#x8868;&#x6570;&#x503C;10~15&#xFF0C;&#x901A;&#x5E38;&#x5F00;&#x5934;&#x4E3A;0x&#x5C31;&#x8868;&#x793A;&#x4E3A;&#x4E00;&#x4E2A;16&#x8FDB;&#x5236;&#x7684;&#x503C;</h3>
<pre><code>            var num = 0x123;
            //&#x5341;&#x516D;&#x8FDB;&#x5236;&#x8F6C;&#x6362;&#x6210;10&#x8FDB;&#x5236;&#xFF1A;1*16&#xB2; + 2*16&#xB9; + 3*16&#xBA; = 291
            console.log(typeof(num),num);//number 291
            var num1 = 0x678f;
            //&#x6362;&#x6210;10&#x8FDB;&#x5236;&#xFF1A;6*16&#x7684;&#x4E09;&#x6B21;&#x65B9; + 7*16&#xB2; + 8*16&#xB9;15*16&#xBA; = 

            //8&#x8FDB;&#x5236;,&#x9022;8&#x8FDB;1,&#x901A;&#x5E38;&#x4EE5;0&#x5F00;&#x5934;&#x3002;
            //&#x5341;&#x8FDB;&#x5236;&#x7684;8&#x7528;&#x516B;&#x8FDB;&#x5236;&#x8868;&#x793A;
            var num2 = 010;
            console.log(num2);//8
            //&#x5341;&#x8FDB;&#x5236;&#x7684;9&#x7528;&#x516B;&#x8FDB;&#x5236;&#x8868;&#x793A;
            var num2 = 011;
            console.log(num2);//9
</code></pre><pre><code>            //isNaN() &#x51FD;&#x6570;&#x7528;&#x4E8E;&#x4EF7;&#x5DEE;&#x5176;&#x53C2;&#x6570;&#x662F;&#x5426;&#x662F;&#x975E;&#x6570;&#x5B57;&#x503C;&#x3002;
            //&#x6570;&#x5B57;&#x7684;&#x5B57;&#x7B26;&#x4E32;&#x7C7B;&#x578B;&#x7684;&#x53D8;&#x91CF;&#x7528;&#x4E8E;&#x5224;&#x65AD;&#x7684;&#x65F6;&#x5019;&#x4F1A;&#x9690;&#x5F0F;&#x8F6C;&#x6362;&#x4E3A;&#x6570;&#x503C;&#x7C7B;&#x578B;&#x3002;
            console.log(isNaN(num6));//false

            var num3 = +Infinity;//&#x6B63;&#x65E0;&#x7A77;
            var num4 = -Infinity;//&#x8D1F;&#x65E0;&#x7A77;
            console.log(typeof(num3),typeof(num4));//number

            var num5 = NaN;
            console.log(typeof(num5));//number

            var obj = {
                name:&quot;html&quot;,
                age:&quot;18&quot;
            }
            console.log(typeof(obj));//object

            var obj1 = obj;
            console.log(obj,obj);

            var num = 123;
            var num1 = num;
            console.log(num,num1);

            num1 = 789;
            console.log(num);//123

            obj1.age=&quot;28&quot;;
            console.log(obj);//28
</code></pre>
                    
                    </section>
                
                
                </div>
            </div>
        </div>

        
        <a href="../../../md/css/JavaScript/JavaScript.html" class="navigation navigation-prev " aria-label="Previous page: JavaScript"><i class="fa fa-angle-left"></i></a>
        
        
        <a href="../../../md/css/JavaScript/2、数据类型的转换.html" class="navigation navigation-next " aria-label="Next page: 数据类型的转换"><i class="fa fa-angle-right"></i></a>
        
    </div>
</div>

        
<script src="../../../gitbook/app.js"></script>

    
    <script src="../../../gitbook/plugins/gitbook-plugin-expandable-chapters-interactive/expandable-chapters.js"></script>
    

    
    <script src="../../../gitbook/plugins/gitbook-plugin-search/lunr.min.js"></script>
    

    
    <script src="../../../gitbook/plugins/gitbook-plugin-search/search.js"></script>
    

    
    <script src="../../../gitbook/plugins/gitbook-plugin-sharing/buttons.js"></script>
    

    
    <script src="../../../gitbook/plugins/gitbook-plugin-fontsettings/buttons.js"></script>
    

    
    <script src="../../../gitbook/plugins/gitbook-plugin-livereload/plugin.js"></script>
    

<script>
require(["gitbook"], function(gitbook) {
    var config = {"expandable-chapters-interactive":{},"highlight":{},"search":{"maxIndexSize":1000000},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"livereload":{}};
    gitbook.start(config);
});
</script>

        
    </body>
    
</html>
